package com.epam.edu.task01.tourism.voucher;

import java.util.Date;

import com.epam.edu.task01.tourism.road.RoadInformation;

public class VoucherToCruise implements VoucherBuilder {
	private int id;
	private String waypoints;
	private Date dateBegin;
	private Date dateEnd;
	private RoadInformation roadInformation;
	private int cruiseCost;

	public VoucherToCruise(int id, String waypoints, Date dateBegin,
			Date dateEnd, RoadInformation roadInformation, int cruiseCost) {
		super();
		this.id = id;
		this.waypoints = waypoints;
		this.dateBegin = dateBegin;
		this.dateEnd = dateEnd;
		this.roadInformation = roadInformation;
		this.cruiseCost = cruiseCost;
	}

	public int getCruiseCost() {
		return cruiseCost;
	}

	public Date getDateBegin() {
		return dateBegin;
	}

	public Date getDateEnd() {
		return dateEnd;
	}

	public int getId() {
		return id;
	}

	public RoadInformation getRoadInformation() {
		return roadInformation;
	}

	public String getWaypoints() {
		return waypoints;
	}

	public void setCruiseCost(int cruiseCost) {
		this.cruiseCost = cruiseCost;
	}

	public void setDateBegin(Date dateBegin) {
		this.dateBegin = dateBegin;
	}

	public void setDateEnd(Date dateEnd) {
		this.dateEnd = dateEnd;
	}

	public void setId(int id) {
		this.id = id;
	}

	public void setRoadInformation(RoadInformation roadInformation) {
		this.roadInformation = roadInformation;
	}

	public void setWaypoints(String waypoints) {
		this.waypoints = waypoints;
	}

	@Override
	public String toString() {
		return "VoucherToCruise [id=" + id + ", waypoints=" + waypoints
				+ ", dateBegin=" + dateBegin + ", dateEnd=" + dateEnd
				+ ", roadInformation=" + roadInformation + ", cruiseCost="
				+ cruiseCost + "]";
	}

	@Override
	public String getVoucherType() {
		return "VoucherToCruise";
	}

	@Override
	public int getVoucherCost() {
		return (this.getCruiseCost() + this.roadInformation.getCost()) * 130 / 100;
	}

}
